<link rel="stylesheet" media="screen" type="text/css" href="<?php echo bu("css/datepicker.css"); ?>" />
<script type="text/javascript" src="<?php echo bu("js/datepicker.js"); ?>"></script>
<script>
		$(function() {
      $( "#datepicker" ).datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'd MM yy',
      });

      $( "#datepicker2" ).datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'd MM yy',
      });

      $( "#datepicker3" ).datepicker({
        changeMonth: true,
        changeYear: true,
        dateFormat: 'd MM yy',
      });
    });
</script>

<script>
  $(document).ready(function(){
    var with_whom = $("#with_whom");
    var accreditation_protocol = $("#accreditation_protocol");

    $("#with_whom").remove();
    $("#accreditation_protocol").remove();

    $("#Accreditation_joint_accreditation_planned_0").live('click', function(){
      $("#with_whom").remove();
      $("#whom").css('display','none');
    });
    $("#Accreditation_joint_accreditation_planned_1").live('click', function(){
      $("#whom").append(with_whom);
      $("#whom").css('display','inline');
    });

    $("#Accreditation_accreditation_protocol_0").live('click', function(){
      $("#accreditation_protocol").remove();
      $("#accreditation_protocol").css('display','none');
    });
    $("#Accreditation_accreditation_protocol_1").live('click', function(){
      $("#protocol").append(accreditation_protocol);
      $("#protocol").css('display','inline');
    });
  });
</script>

<div class='mainContainer home'> <!-- Main div for the contain, behaves like a table-->
	<div><!-- Direct child of mainContainer, behaves like a table cell-->
		<?php // echo $this->renderPartial('/partials/_notifications'); ?>
		<h2 class='differentAlign'>Accreditation Registration Form</h2>
		<div class='spacer'>&nbsp;</div>
		<?php
      $form=$this->beginWidget('CActiveForm', array(
      'action' => bu('users/accreditation'),
      'htmlOptions' => array(
          'name' => 'myForm',
          'class' => 'myForm customForm',
          )
      ));
    ?>
      <?php echo $form->errorSummary($model); ?><br />

      <fieldset>
        <legend>Additional Information</legend>
        <table>
          <tr>
            <td><label>School Name </label></td>
            <td>
              <?php echo $form->textField($model, 'school_name', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'school_name'); ?>
            </td>
          </tr>
          <tr>
            <td><label>Phone</label></td>
            <td>
              <?php echo $form->textField($model, 'phone', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'phone'); ?>
            </td>
          </tr>
          <tr>
            <td><label>Fax</label></td>
            <td>
              <?php echo $form->textField($model, 'fax', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'fax'); ?>
            </td>
          </tr>
          <tr>
            <td><label>Mailing Address</label></td>
            <td>
              <?php echo $form->textField($model, 'mailing_address', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'mailing_address'); ?>
            </td>
          </tr>
          <tr>
            <td><label>Administrator/Director</label></td>
            <td>
              <?php echo $form->textField($model, 'administrator_director', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'administrator_director'); ?>
            </td>
          </tr>
          <tr>
            <td><label>Email</label>
            <td>
              <?php echo $form->textField($model, 'email', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, "email"); ?>
            </td>
          </tr>
          <tr>
            <td><label>Year founded Enrollment</label></td>
            <td>
              <?php echo $form->textField($model, 'founded', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'founded'); ?>
            </td>
          </tr>
          <tr>
            <td><label>Grade/ages served</label></td>
            <td>
              <?php echo $form->textField($model, 'grade_served', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'grade_served'); ?>
            </td>
          </tr>
        </table>
      </fieldset>

      <fieldset>
        <legend>Accreditation Desired</legend>

        <table>
          <tr>
            <td>
              <label>Early Education</label>
              <div class="additional_info">Age levels</div>
              <div class="additional_info">Current year</div>
            </td>
            <td>
              <div class="additional_input">
                <?php echo $form->textField($model, 'early_from', array('class' => 'full', 'required' => 'required')); ?>
                <?php echo $form->error($model, 'early_from'); ?>
                <br />
                <?php echo $form->textField($model, 'early_current', array('class' => 'full', 'required' => 'required')); ?>
              <?php echo $form->error($model, 'early_current'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>Elementary</label>
              <div class="additional_info">Grade levels from</div>
              <div class="additional_info">through</div>
            </td>
            <td>
              <div class="additional_input">
               <?php echo $form->textField($model, 'elementary_from', array('class' => 'full', 'required' => 'required', 'style' => 'width:50px')); ?>
                <?php echo $form->error($model, 'elementary_from'); ?>
               <br />
               <?php echo $form->textField($model, 'elementary_to', array('class' => 'full', 'required' => 'required', 'style' => 'width:50px')); ?>
                <?php echo $form->error($model, 'elementary_to'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>Secondary</label>
              <div class="additional_info">Grade levels from</div>
              <div class="additional_info">through</div>
            </td>
            <td>
              <div class="additional_input">
                <?php echo $form->textField($model, 'secondary_from', array('class' => 'full', 'required' => 'required', 'style' => 'width:50px')); ?>
                <?php echo $form->error($model, 'secondary_from'); ?>
                <br />
                <?php echo $form->textField($model, 'secondary_to', array('class' => 'full', 'required' => 'required', 'style' => 'width:50px')); ?>
                <?php echo $form->error($model, 'secondary_to'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>Boarding Facility</label></td>
            <td>
              <?php echo $form->dropDownList($model, 'accreditation_boarding_facility', array('Yes' => 'Yes', 'No' => 'No')); ?>
              <?php echo $form->error($model, 'accreditation_boarding_facility'); ?>
            </td>
          </tr>
        </table>
      </fieldset>

      <fieldset>
        <legend>If Currently Accredited</legend>

        <table width='100%'>
          <tr>
            <td><label>Date Accreditation Granted</label>
              <div class="additional_info">Initially</div>
              <div class="additional_info">Current Year</div>
            </td>
            <td>
              <br />
              <div class="additional_input">
                <?php echo $form->textField($model, 'currently_from', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px;')); ?>
                <?php echo $form->error($model, 'currently_from'); ?>
                <br />
                <?php echo $form->textField($model, 'currently_to', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px;')); ?>
                <?php echo $form->error($model, 'currently_to'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>Grades/ages Accredited</label>
              <div class="additional_info">Initially</div>
              <div class="additional_info">Current Year</div>
            </td>
            <td>
              <br />
              <div class="additional_input">
                <?php echo $form->textField($model, 'grades_from', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px')); ?>
                <?php echo $form->error($model, 'grades_from'); ?>
                <br />
                <?php echo $form->textField($model, 'grades_to', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px')); ?>
                <?php echo $form->error($model, 'grades_to'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>If Jointly Accredited</label>
              <div class="additional_info">With Whom?</div>
              <div class="additional_info">Grades Accredited</div>
            </td>
            <td>
              <div class="additional_input">
                <?php echo $form->textField($model, 'accredited_joint_whom', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px')); ?>
                <?php echo $form->error($model, 'accredited_joint_whom'); ?>
                <br />
                <?php echo $form->textField($model, 'accredited_joint_grade', array('class' => 'full', 'required' => 'required', 'style' => 'width:50px')); ?>
                <?php echo $form->error($model, 'accredited_joint_grade'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>Date</label>
              <div class="additional_info">Renewal date of accreditation</div>
              <div class="additional_info">Date of Expiration </div>
            </td>
            <td>
              <div class="additional_input">
                <?php echo $form->textField($model, 'renewal_date', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px', 'required' => 'required', 'readonly' => 'readonly', 'id' => 'datepicker2')); ?>
                <?php echo $form->error($model, 'renewal_date'); ?>
                <br />
                <?php echo $form->textField($model, 'expiration_date', array('class' => 'full', 'required' => 'required', 'style' => 'width:100px', 'required' => 'required', 'readonly' => 'readonly', 'id' => 'datepicker3')); ?>
                <?php echo $form->error($model, 'expiration_date'); ?>
              </div>
            </td>
          </tr>
          <tr>
            <td><label>Joint Accreditation Planned</label></td>
            <td class="checkbox">
              <?php
                $model->joint_accreditation_planned = 'No';
                echo $form->radioButtonList($model, 'joint_accreditation_planned', array(
                  'No' => 'No',
                  'Yes' => 'Yes',
                ));
              ?>

              <span id="whom" style="display:none;">
                With Whom?
                <?php echo $form->textField($model, 'whom', array('required' => 'required', 'id' => 'with_whom')); ?>
              </span>
            </td>
          </tr>
          <tr>
            <td><label>ACSI accreditation protocol to be used</label></td>
            <td class="checkbox">
              <?php
                $model->accreditation_protocol = 'REACH';
                echo $form->radioButtonList($model, 'accreditation_protocol', array(
                  'REACH' => 'REACH',
                  'other' => 'Other',
                ));
              ?>

              <span id="protocol" style="display:none;">
                <?php echo $form->textField($model, 'accreditation_protocol', array('required' => 'required', 'value' => '', 'id' => 'accreditation_protocol')); ?>
                <?php echo $form->error($model, 'accreditation_protocol'); ?>
              </span>
            </td>
          </tr>
        </table>
      </fieldset>

      <fieldset>
        <legend>Please confirm captcha correctly</legend>
        <?php $form->widget('CCaptcha'); ?><br />
        <?php echo $form->textField($model, 'verifyCode'); ?>
        <?php echo $form->error($model, "verifyCode"); ?>
      </fieldset>

			<input type='submit' value='Submit' />
			<input type='submit' value='Reset' />
		<?php $this->endWidget(); ?>
	</div>

    <div class='rightPane'>
		<h2 class='differentAlign'>Our <span class='differentHeading'>Contact</span></h2>
		<div class="contact">
			<h3>ACSI Head Quarters</h3>
      731 Chapel Hills Drive Colorado Springs<br />
      CO 80920.3949<br />
      Phone : +1.719.528.6906<br />
      Fax : +1.719.531.0631<br />
      Email : info@acsiglobal.org
		</div>
    <div class="contact">
			<h3>ACSI Indonesia</h3>
      Komplek Ruko Klampis Megah B-25<br />
      Jl. Klampis Madya Utara I/6<br />
      Surabaya - Jawa Timur 60117<br />
      Phone/Fax : +62.31-591.0897, 591.3068<br />
      Phone : +62.31-592.9902<br />
      Mobile : +62.31-8193.5548<br />
      Email : acsi-indonesia@acsi.or.id<br />
      http://acsiglobal.org; acsi.or.id
		</div>
    <div class="contact">
			<h3>Indonesia Representative Office</h3>
      <b>Jakarta</b><br />
      Jl. Kwitang Raya No. 4, 3rd Floor<br />
      Senen - Jakarta Pusat 10420<br />
      Phone/Fax : +62.21-391.1207<br />
      Mobile : +62.31-3631-8020<br />
      Email : acsi-jakarta@acsi.or.id
		</div>
	</div>
</div>

<div class='spacer'>&nbsp;</div>